#ifndef QMLSIGNAL_H
#define QMLSIGNAL_H

#include <QObject>


// 一个用来向qml发signal的单例类
class QMLSignal : public QObject
{
    Q_OBJECT
private:
    QMLSignal();

public:
    static QMLSignal& I();

    Q_INVOKABLE void exitProgram();

signals:
    void experimentEnd(QString equId);
    void experimentInterruption(QString equId);
    void startExperimentStatus(QString status);
    void experimentError(QString equId);
    void test(int num);

public:
    void emitExperimentEnd(QString equId);      // 还是发设备Id吧
    void emitExperimentError(QString equId);

    void emitTest(int num);
    void emitExperimentInterruption(QString equId);
    void emitStartExperimentStatus(QString status);     // status=0启动失败 status=1启动成功 status=2用户取消 status=3wlk保存成功
};
#endif // QMLSIGNAL_H
